﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class usercontrol_SanPham : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //int madm = Convert.ToInt32(Request.QueryString["MaDM"].ToString());
        DataTable dt = Xulydulieu.ExecuteQuery("select MaSP,TenSP,Hinh,Gia from SanPham order by Gia desc");
        CollectionPager2.MaxPages = 10000;
        CollectionPager2.PageSize = 8;
        //CollectionPager1.DataSource = dt.Tables[0].DefaultView;
        CollectionPager2.DataSource = dt.DefaultView;
        CollectionPager2.BindToControl = dtlSP;
        dtlSP.DataSource = CollectionPager2.DataSourcePaged;
        dtlSP.DataBind();
    }
}